<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="renderer" content="webkit"> 
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> 
<meta name="format-detection" content="telephone=no" /> 
<link rel="shortcut icon" href="images/logo.ico" />
<title>闪度生活</title>
<meta name="keywords" content=" " />
<meta name="description" content=" " />


<link rel="stylesheet" type="text/css" href="css/common.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.css">
<link rel="stylesheet" type="text/css" href="css/swiper-3.4.1.min.css">
<link rel="stylesheet" type="text/css" href="css/style.css">

<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.js"></script>
<script src="js/jquery-ui.min.js"></script>
<script src="js/easing.js"></script>
<script src="js/swiper-3.4.1.min.js"></script>
<script src="js/index.js"></script>
<script src="js/main.js"></script>

<script src="./js/vue.js"></script>
<script src="./js/axios.min.js"></script>
<script src="./js/axios-config.js"></script>
<script src="./js/js.cookie.js"></script>
<script src="./js/utils.js"></script>

</head>

<body>
<div id="app" v-cloak>
<!--  / header  -->
<div class="header_longevity">
    <div class="header_map_longevity">   
        <img src="images/jiantou.png" alt="">
        <span>返回</span>
    </div>
    <div class="logo_longevity">资讯详情</div>
    <div class="header_shop_longevity" @click="collect">
        <!--<img v-if="CheatsCateDetails.is_collect" src="images/sc-sel.png" alt="" class="InformationDetails7_f3_f2_img2 img-hidden">
        <img v-else src="images/sc.png" alt="" class="InformationDetails7_f3_f2_img1">-->
        <img v-if="CheatsCateDetails.is_collect" src="images/sc-sel.png" alt="" class="InformationDetails7_f3_f2_img2">
        <img v-else src="images/sc.png"  alt="" class="InformationDetails7_f3_f2_img1">
        <!--<span>{{collect_state}}</span>-->
        <span v-if="CheatsCateDetails.is_collect">已收藏</span>
        <span v-else>收藏</span>
    </div>   
</div>
<!--  / header  -->


<div class="InformationDetails">
	<iframe :src="CheatsCateDetails.url" width="100%" height="4000" frameborder="0" scrolling="no"></iframe>
   <!-- <div class="InformationDetails1">福建考生登录福建省打开肌肤</div>
    <div class="InformationDetails2">2018-01-11 &nbsp; 16:12</div>
    <div class="InformationDetails3">
        <p>城市交通问题是世界各国普遍性问题，它直接影响经济的发展和人们的生活。无线车辆检测器就是针对解决上述问题而建立的。无线车辆磁敏传感器研究项目是将传感器技术和无线网络技术有效地融于一体，通过使用磁敏传感器检测车辆对地磁的影响来获得道路上的重要车流信息，系统同时还集成了温度传感器和化学传感器，可以实时地测量路面的温度和结冰情况。作为交通数据采集设备中最重要的车辆检测传感器，可以收集详细、充分的交通数据将为各种决策提供科学的依据和数据基础。</p>
        <p>无线车辆磁敏传感器改变了传统的道路环境状况获取技术大多是分立的单一参数的实时信息获取的特点，降低了道路信息系统的建设维护成本。本系统具有改变目前道路信息采集手段分散，提高道路信息采集系统的集成度等特点，更好地适应道路交通信息采集的应用需求。</p>
    </div>
    <div class="InformationDetails4">
        <img src="images/detail-1.jpg" alt="">
    </div>-->

</div>


<!--  / footer  -->
<div class="footer1 footer1_news">
  <ul class="clearfix">
    <li class="ind_share_btn">
    	  <div class="footer_img_n">
    	  	  <img src="images/news_pl1.png">大家在评论<span>{{CheatsCateDetails.evaluate}}</span>
    	  </div>
    </li>
    <li class="ind_share_btn1">
    	  <div class="footer_img_n">
      		  <img src="images/news_pl2.png">评论
          </div>
    </li>
  </ul>
</div> 
<div class="pinglun-show">
    <input type="text" v-model="comment" placeholder="请输入要评论内容...(限80字)">
    <a href="##" @click="publish">发表</a>
</div>
<div class="pinglun1_show">
    <div class="pinglun1_show_bg"></div>
    <div class="pinglun1_show_con">
        <h5>{{remind}}</h5>
        <div class="pinglun1_show_con_f1">
            <a href="##" @click="yes">好的，知道了</a>
        </div>
    </div>
</div>
</div>
<!--  / footer -->

</body>
<script>
$(window).ready(function(){
	
	var vm = new Vue({
		el:"#app",
		data() {
            return {
                CheatsCateDetails: [],
                comment:'',
                remind : '',
                collect_state: ''
            }
		},
    created: function () {
		var $this = this;
    	$this.getCheatsCateDetails();
    	
    },
    mounted:function(){
    	
    },
    methods:{
    	
    	//咨询详情
    	getCheatsCateDetails:function(){
    		var $this = this;
    		const data = {
    			cheats_id : getCookie("cheats_details_id")
    		}
    		
    		Axios.post(window.Url.Cheats_cate_details,data).then((res) => {
    			
    			
    			if(res.result == 1){
    				$this.CheatsCateDetails = res.info.cheats;
    			}
    			else{
    				console.log('咨询列表:'+res.info);
    			}
    			
	        }).catch((err) => {
	          console.log('咨询列表:'+err);
	        })
    	},
    	//发布评论
    	publish:function(){
    		var $this = this;
    		const data = {
    			cheats_id : getCookie("cheats_details_id"),
    			comment: $this.comment
    		}
    		
    		Axios.post(window.Url.Cheats_evaluate_publish,data).then((res) => {
    			
    			$this.remind = res.info
    			console.log($this.remind);
    			if(res.result == 1){
//  				$this.CheatsCateDetails = res.info.cheats;
					
    			}
    			else{
    				console.log('发布评论:'+res.info);
    			}
    			
	        }).catch((err) => {
	          console.log('发布评论:'+err);
	        })
    	},
    	//点击确认之后刷新页面
    	yes:function(){
    		location.reload();
    	},
    	//跳转详情页
    	jump:function(cheats_id){
    		setCookie('cheats_details_id',cheats_id)
    		window.location.href = "InformationDetails.html";
    	},
    	//收藏
    	collect:function(){
    		var $this = this;
    		const data = {
    			cheats_id : getCookie("cheats_details_id")
    		}
    		
    		Axios.post(window.Url.Cheats_evaluate_collect,data).then((res) => {
    			
    			$this.remind = res.info
    			console.log($this.remind);
    			if(res.result == 1){
//  				$this.CheatsCateDetails = res.info.cheats;
					
    			}
    			else{
    				console.log('收藏:'+res.info);
    			}
    			
	        }).catch((err) => {
	          console.log('收藏:'+err);
	        })
    	}
    }
})
	
	
 var flag=true;
$('.header_map_longevity').click(function(){
    history.go(-1);
});
$('.longevity1 li').click(function(){
    window.location.href = "InformationDetails.html";
});
$('.ind_share_btn').click(function(){
    window.location.href = "pinLun.html";
});
$('.ind_share_btn1').click(function(){
    $('.foot1').css('display','none');
    $('.pinglun-show').css('display','block');
});
$('.pinglun-show a').click(function(){
    $('.foot1').css('display','block');
    $('.pinglun-show').css('display','none');
    $('.pinglun1_show').css('display','block');
//  $('.pinglun1_show h5').html('请输入评论内容');
});
$('.header_shop_longevity').click(function(){
  if(flag){
    $(this).find('.InformationDetails7_f3_f2_img1').addClass('img-hidden');
    $(this).find('.InformationDetails7_f3_f2_img2').removeClass('img-hidden');
//  $(this).find('span').html('已收藏');
    $('.pinglun1_show').css('display','block');
//  $('.pinglun1_show h5').html('收藏成功');
    flag=false;
  }else{
     $(this).find('.InformationDetails7_f3_f2_img2').addClass('img-hidden');
     $(this).find('.InformationDetails7_f3_f2_img1').removeClass('img-hidden');
     $(this).find('span').html('收藏'); 
     $('.pinglun1_show').css('display','block');
     $('.pinglun1_show h5').html('取消收藏成功');
    flag=true;
  }
})
$('.pinglun1_show_con_f1 a').click(function(){
    $('.pinglun1_show').css('display','none');
})
  
})  
</script>
</html>
